package com.gxa.controller;

import com.gxa.pojo.RaMoney;
import com.gxa.pojo.Refmgt;
import com.gxa.utils.Constants;
import com.gxa.utils.ResponseData;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA.
 * User: zxy
 * Date: 2020/11/26 14:22
 * Description:
 * Version: V1.0
 */
@RestController
@RequestMapping("/drawback")
@Api(value = "退款管理",tags = "退款管理")
public class drawbackController {

    @Autowired
    private ResponseData responseData;

    @PostMapping(value = "/addDrawback")
    @ApiOperation(value = "添加退款信息",notes = "添加退款信息",httpMethod = "POST", response = ResponseData.class)
    public ResponseData addDrawback(){
        Refmgt refmgt = new Refmgt();
        refmgt.setRefmgtOn("操作备注");
        refmgt.setRefmgtRm("退款方式");
        refmgt.setRefmgtRi("退款说明");
        RaMoney raMoney = new RaMoney();
        raMoney.setAmount(1000.00);
        raMoney.setFreight(500.00);
        raMoney.setFrestatus(1);
        refmgt.setRaMoney(raMoney);
        responseData.setCode(Constants.SUCCESS);
        responseData.setMsg("添加成功");
        responseData.setData(refmgt);
        return responseData;
    }
}
